This repository was archived by the owner on Jul 22, 2025. It is now read-only.
generated from discourse/discourse-plugin-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 40
DEV: Update rate limits for image captioning #816
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Opt-for less intrusive toast message instead.
keegangeorge
commented
Oct 1, 2024
| requires_plugin ::DiscourseAi::PLUGIN_NAME | ||
| requires_login | ||
| before_action :ensure_can_request_suggestions | ||
| before_action :rate_limiter_performed!, except: %i[prompts] |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sneaking in this small change that was missed previously. The prompts controller action no longer exists as it was removed here #472.
tyb-talks
reviewed
Oct 2, 2024
tyb-talks
approved these changes
Oct 2, 2024
Contributor
tyb-talks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! left a minor comment.
pmusaraj
approved these changes
Oct 2, 2024
Co-authored-by: Penar Musaraj <[email protected]>
- Surface rate limit error message - Use constants for rate limit amount/intervals
xfalcox
approved these changes
Oct 2, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔍 Overview
This PR updates the rate limits for AI helper so that image caption follows a specific rate limit of 20 requests per minute. This should help when uploading multiple files that need to be captioned. This PR also updates the UI so that it shows toast message with the extracted error message instead of having a blocking
popupAjaxErrorerror dialog.📸 Screenshots